const app = getApp();

Page({
  data: {
    inputValue: '',
  },
  onBlur(e) {
    this.setData({
      inputValue: e.detail.value,
    });
  },
  add() {
    my.httpRequest({
      url: app.siteInfo.siteroot + '?i=' + app.siteInfo.uniacid + '&t=' + app.siteInfo.multiid + '&v=' + app.siteInfo.version + 
          '&from=aliapp&c=entry&a=aliapp&m=demo_aliapp&do=insert',
      method: 'POST',
      data: {todo: this.data.inputValue},
      dataType: 'json',
      success: function(res) {
        console.info(res);
      },
      fial: function(res) {
        my.alert({content: 'fail'});
      }
    });

    my.navigateBack();
  },
});
